import React, { Suspense } from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
// 引入mock 接口
import './data/data';
// 引入 redux 状态管理库
import store from './store/index'
// 引入 provide 挂载组件
import { Provider } from 'react-redux'
import App from './router/RouterView';
import { BrowserRouter } from 'react-router-dom';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <Provider store={store}>
    <Suspense fallback='loading...'>
      <BrowserRouter>
        <App />
      </BrowserRouter>
    </Suspense>
  </Provider>
);

